﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CIIS.Common;
using DevExpress.XtraEditors;
using Contract.Domain;

namespace CIIS
{
    public partial class PacManage : Manage
    {
        public PacManage()
        {
            InitializeComponent();

            InitUserControl();
        }

        private void InitUserControl()
        {
            RegisterOptFormType(typeof(ProtectAndCoordinate), typeof(ProtectAndCoordinate));

            BindGridData(typeof(t_tq_bhxt));

            InitButtonsWithFlag(new string[] { "添加" }, new EOperateType[] { EOperateType.Add });

            InitParamControl(new bool[] { true, true, false, true, false, false },
                new string[] { "特情代号：", "使用民警:", "", "被协调单位：", "", "" },
                new DropdownControlParam[] { null, DataUtils.Instance.SymjDcp, null, DataUtils.Instance.OfficeDcp, null, null });

            InitGridViewDataColumns(new string[] { "选中", "特情代号", "申请民警", "申请时间", "填报单位", "被协调单位" },
                new string[] { "IsSelected", "RYDH", "SYMJ", "RKSJ", "DJDW", "BXTDW" },
                null);

            InitGridViewOptColumnWithFlag(new string[] { "详情", "修改", "删除" },
                new EOperateType[] { EOperateType.Detail, EOperateType.Modify, EOperateType.Delete });
        }

        //void btnAdd_click(object sender, EventArgs ent)
        //{
        //    ProtectAndCoordinate dlg = new ProtectAndCoordinate();
        //    dlg.OptType = EOperateType.Add;
        //    dlg.ShowDialog();
        //}
        //void linkDetail_click(object sender, EventArgs ent)
        //{
        //    ProtectAndCoordinate dlg = new ProtectAndCoordinate();
        //    dlg.OptType = EOperateType.Detail;
        //    dlg.ShowDialog();
        //}
        //void linkModify_click(object sender, EventArgs ent)
        //{
        //    ProtectAndCoordinate dlg = new ProtectAndCoordinate();
        //    dlg.OptType = EOperateType.Modify;
        //    dlg.ShowDialog();
        //}
        //void linkDelete_click(object sender, EventArgs ent)
        //{
        //}
    }
}
